/**
 * caicongyang.com Inc.
 * Copyright (c) 2004-2017 All Rights Reserved.
 */
package com.caicongyang.design.factory;

/**
 * 简单工厂:把对象的创建抽取一个公共的类中来做，根据不同的条件创建不同的类
 * @author caicongyang1
 * @version id: SimpleFactoryClientTest, v 0.1 17/5/4 下午7:55 caicongyang1 Exp $$
 */
public class SimpleFactoryClientTest {
    public static void main(String[] args) {
        Operation operation = OperationFactory.createOperation("+");
        operation.setNumberA(6);
        operation.setNumberB(7);
        double result = operation.getResult();
        System.out.println(result);
    }
}
